@extends('front.common.header')

@section('title', '重置密码')

@section('header')
    @parent
@stop
@section('content')
<link  rel="stylesheet" type="text/css" href="{{ asset('/css/common/report.css') }}" >
<div class="main">
    <div class="report-main">
        <div class="report-title">找回密码</div>
        <div>
            <input type="hidden" name="reset_type" value="{{empty($reset_type)?1:$reset_type}}">
            <div class="report-step @if($reset_type == 2) hide @endif" id="home-tab">
                <div class="report-step-step" id="step1_ti">
                    <img src="{{asset('/images/reset/reset_phone_1.png')}}">
                </div>
                <div class="report-step-step margin-left-020" id="step2_ti_cursor">
                    <img src="{{asset('/images/reset/reset_phone_2_on.png')}}">
                </div>
            </div>
            <div class="report-step @if($reset_type == 1) hide @endif" id="profile-tab">
                <div class="report-step-step" id="p_step1_ti">
                    <img src="{{asset('/images/reset/reset_email_1.png')}}">
                </div>
                <div class="report-step-step margin-left-020" id="p_step2_ti">
                    <img src="{{asset('/images/reset/reset_email_2.png')}}">
                </div>
                <div class="report-step-step margin-left-020" id="p_step2_ti_cursor">
                    <img src="{{asset('/images/reset/reset_email_3_on.png')}}">
                    <div class="step-number-3-cursor">3</div>
                </div>
            </div>
        </div>
        <div class="clearfix mt-20 padd-l-15">
            <ul class="nav nav-tabs" role="tablist">
                <li class="@if($reset_type == 1) active @endif"><a href="{{url('/password/email?reset_type=1')}}">通过手机找回</a></li>
                <li class="@if($reset_type == 2) active @endif"><a href="{{url('/password/email?reset_type=2')}}">通过邮箱找回</a></li>
            </ul>
        </div>
        <div class="tab-content">
            @if (count($errors) > 0)
				<div class="alert alert-danger mt-20">
					<ul>
						@foreach ($errors->all() as $error)
							<li>{{ $error }}</li>
						@endforeach
					</ul>
				</div>
			@endif
            <div role="tabpanel" class="report-content tab-pane @if($reset_type == 2) active @endif" id="profile">
                <div class="report-content" id="p_step2">
                    <form method="post" action="{{url('/password/reset')}}">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
						<input type="hidden" name="token" value="{{ $token }}">
                        <div class="report-info-inline" style="padding-top: 40px;">
                            <div class="form-group">
                                <input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="请输入邮箱">
                            </div>
                            <div class="form-group">
                                <input type="password" class="form-control" name="password" placeholder="请输入新密码">
                            </div>
                            <div class="form-group">
                                <input type="password" class="form-control" name="password_confirmation" placeholder="请再次输入新密码">
                            </div>
                            <div class="form-group">
                                <button class="btn btn-reset-btn" type="submit">
                                    确&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;认
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div role="tabpanel" class="report-content tab-pane @if($reset_type == 1) active @endif" id="home">
                <div class="report-content" id="step2">
                    <form id='resetPasswordForm' method="post" action="{{url('/password/phonereset')}}">
                        {!! csrf_field() !!}
                        <input type="hidden" name="phone" value="{{ empty(old('username'))?old('phone'):old('username') }}">
                        <input type="hidden" name="phone_code" value="{{old('phone_code')}}">
                        <div  class="report-info-inline">
                            <div class="form-group">
                                <input type="password" name="password" class="form-control" placeholder="请输入新密码">
                            </div>
                            <div class="form-group">
                                <input type="password" name="password_confirmation" class="form-control" placeholder="请再次输入新密码">
                            </div>
                            <div class="form-group">
                                <button class="btn btn-reset-btn" type="submit">
                                    确&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;认
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@stop

<!-- 底部块 -->
@section('footer')
    @parent
@stop